******************************************************************************
* Share yes by precinct
******************************************************************************

use dataset_fort_worth_cross, clear

gen myy = 32.72618 
gen myx = -97.31219

foreach year in  2009 2014 2020 {
	
	#delimit;
	
	spmap pctyes using "dataset_fort_worth_coords_`year'"
	,
		id(id`year')
		name(g`year', replace)
		title(`year', size(huge))
		clmethod(quantile)
		clnumber(10)
		ndfcol(blue)
		ocol(
			white white white white white white
			white white white white white white
		)
		fcol(Greys2)
		legend(off)
		point(
			xcoord(myx) ycoord(myy) shape(Oh)
			size(vlarge)
			osize(thick)
			ocol(red)
		)
		;

	#delimit cr
	
	gr close
	
}

gr combine g2009 g2014 g2020, rows(1) ysize(1) xsize(3)
gr export "_output/figure A5 a.pdf", replace

******************************************************************************
* Share black by precinct
******************************************************************************

use dataset_fort_worth_cross, clear

gen myy = 32.72618 
gen myx = -97.31219

foreach year in  2009 2014 2020 {
	
	#delimit;
	
	spmap pctnhblack using "dataset_fort_worth_coords_`year'"
	,
		id(id`year')
		name(g`year', replace)
		title(`year', size(huge))
		clmethod(quantile)
		clnumber(10)
		ndfcol(white)
		ocol(
			white white white white white white
			white white white white white white
		)
		fcol(Greys2)
		legend(off)
		point(
			xcoord(myx) ycoord(myy) shape(Oh)
			size(vlarge)
			osize(thick)
			ocol(red)
		)
		;
	
	#delimit cr
	
	gr close
	
}

gr combine g2009 g2014 g2020, rows(1) ysize(1) xsize(3)
gr export "_output/figure A5 b.pdf", replace

******************************************************************************
* End
******************************************************************************
